﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <script>
        let arr = ['寄', '太美', 22, true];

        // 1.for of
        for (let item of arr) {
            console.log(item);
        }
        // 2. for in
        for (var i in arr) {
            console.log(i, arr[i]);
        }
    </script>
</body>
</html>